home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / cprog.EXE / PRINTDAT.C < prev    next >
C/C++ Source or Header  |  1996-07-05  |  537b  |  22 lines

  1. #include "stdio.h"
  2.  
  3. main()
  4. {
  5. FILE *guzel,*printer;
  6. int c;
  7.  
  8.    guzel = fopen("onsatir.txt","r"); /* kutugu acalim        */
  9.    printer = fopen("PRN","w");        /* printeri acalim     */
  10.  
  11.    do {
  12.       c = getc(guzel);    /* kutukten bir karakter okuyoruz  */
  13.       if (c != EOF) {
  14.      putchar(c);      /* ekranda goruntuleyelim          */
  15.      putc(c,printer); /* ve yaziciya yollayalim          */
  16.       }
  17.    } while (c != EOF);    /* ta ki (End Of File) kutuk bitene kadar */
  18.  
  19.    fclose(guzel);
  20.    fclose(printer);
  21. }
  22.